home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-27 | 810 b | 37 lines | [TEXT/CWIE] |
- /*
- TimeUtils.java
-
- Demonstration of JDK Native Methods.
-
- © 1997 by Michael J. Webb (mjw@codewell.com)
-
- */
-
- class TimeUtils
- {
-
- /** The following code is claimed to cause JDK to try to load
- our shared library. It is also claimed to be case sensitive
- (which seems odd for MacOS). It uses CFM to load the shared
- library - so putting an alias to the shared library in the
- "JavaSoft Folder" folder is usually a good thing.
- */
- static
- {
- System.loadLibrary("TimeUtilsPPC");
- }
-
- /** A static native method to access the system clock.
- */
- public static native int GetRealTime();
-
- /** A static native method to get the tick count.
- */
- public static native int GetRelativeTime();
-
- /** A static native method to get a time string.
- */
- public static native String GetTimeString(int someTime);
-
- }
-